module('Initial subfields implementation');
test('subfields()', function() {
	same( subfields('bla'), {'_':'bla'}, 'content, no subfield');
	same( subfields('a^bc'), {'_':'a', 'b':'c'}, 'content, one subfield');
	same( subfields('^bc'), {'_':'', 'b':'c'}, 'empty content, one subfield');
})
module('JSON2 library');
test('stringify()', function() {
	same( JSON.stringify({a:1,b:2}), '{"a":1,"b":2}', 'simple object' );
})
module('compositeField prototype');
test('parse() and dump()', function() {
    var field = compositeField('a^bc');
    field.parse();
    same( field.dump(), {"_":"a","b":"c"}, 'simple object dump' );
    field.parse('^bc^de');
    same( field.dump(), {"_":"","b":"c","d":"e"}, 'no leading field value' );
})

